package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.DeviceAlarmsMapper;
import com.ruoyi.system.domain.DeviceAlarms;
import com.ruoyi.system.service.IDeviceAlarmsService;

/**
 * 设备告警Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-08-19
 */
@Service
public class DeviceAlarmsServiceImpl implements IDeviceAlarmsService 
{
    @Autowired
    private DeviceAlarmsMapper deviceAlarmsMapper;

    /**
     * 查询设备告警
     * 
     * @param id 设备告警主键
     * @return 设备告警
     */
    @Override
    public DeviceAlarms selectDeviceAlarmsById(Long id)
    {
        return deviceAlarmsMapper.selectDeviceAlarmsById(id);
    }

    /**
     * 查询设备告警列表
     * 
     * @param deviceAlarms 设备告警
     * @return 设备告警
     */
    @Override
    public List<DeviceAlarms> selectDeviceAlarmsList(DeviceAlarms deviceAlarms)
    {
        return deviceAlarmsMapper.selectDeviceAlarmsList(deviceAlarms);
    }

    /**
     * 新增设备告警
     * 
     * @param deviceAlarms 设备告警
     * @return 结果
     */
    @Override
    public int insertDeviceAlarms(DeviceAlarms deviceAlarms)
    {
        return deviceAlarmsMapper.insertDeviceAlarms(deviceAlarms);
    }

    /**
     * 修改设备告警
     * 
     * @param deviceAlarms 设备告警
     * @return 结果
     */
    @Override
    public int updateDeviceAlarms(DeviceAlarms deviceAlarms)
    {
        return deviceAlarmsMapper.updateDeviceAlarms(deviceAlarms);
    }

    /**
     * 批量删除设备告警
     * 
     * @param ids 需要删除的设备告警主键
     * @return 结果
     */
    @Override
    public int deleteDeviceAlarmsByIds(Long[] ids)
    {
        return deviceAlarmsMapper.deleteDeviceAlarmsByIds(ids);
    }

    /**
     * 删除设备告警信息
     * 
     * @param id 设备告警主键
     * @return 结果
     */
    @Override
    public int deleteDeviceAlarmsById(Long id)
    {
        return deviceAlarmsMapper.deleteDeviceAlarmsById(id);
    }
}
